package com.macro.mall.service.impl;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.macro.mall.dto.UmsMemberParam;
import com.macro.mall.mapper.UmsMemberMapper;
import com.macro.mall.model.UmsMember;
import com.macro.mall.service.UmsMemberService;
@Service
public class UmsMemberServiceImpl implements UmsMemberService {
    
    @Autowired
    private UmsMemberMapper umsMemberMapper;

    @Override
    public List<UmsMember> getList(UmsMemberParam umsMemberParam) {
        PageHelper.startPage(umsMemberParam.getPageNum(), umsMemberParam.getPageSize());
        List<UmsMember> list = umsMemberMapper.findAll(umsMemberParam);
        return list;
    }

    @Override
    public UmsMember getItem(@Param("id")Long id) {
        UmsMember umsMember = umsMemberMapper.selectItem(id);
        return umsMember;
    }


}
